<!--智慧政务-办理指南详情列表-->
<template>
	<view class="root">
		<view id="header">
			<view class='headervw'>
				<view class='headertx'>
					{{detailData.title}}
				</view>
			</view>
			<view class="line"></view>
		</view>
		<view class="content">
			<rich-text :nodes="detailData.htmlNodes"></rich-text>
		</view>
	</view>
</template>

<script>
	import uParse from '@/components/u-parse/u-parse.vue';
	import htmlParser from '@/config/html-parser'
	export default {
		data() {
			return {
				detailData: {
					title: '',
					htmlNodes: ''
				},
			}
		},
		components: {
			uParse
		},
		onLoad(options) {
			console.log(options);
			var id = options.id;
			this.inquiryArticle(id)
		},
		methods: {
			//文章详情
			inquiryArticle(id) {
				let that = this;
				this.$api.request.inquiryArticle({
					articleUuid: id
				}, function(res) {
					if (res.body.status.statusCode === '0') {
						that.detailData = res.body.data;
						var content = that.detailData.content;
						that.detailData.htmlNodes = that.$api.htmlParser.parseHtml(that.detailData.content);
						console.log(that.detailData.htmlNodes)
					}
				})
			}
		}
	}
</script>

<style>
	.root {
		width: 100%;
		height: 100%;
		padding: 40upx;
		padding-top: 10upx;
	}

	.headervw {
		width: 100%;
		/* height: 60upx; */
		text-align: center;
	}

	.headertx {
		font-size: 36upx;
		font-weight: bold;
		/* line-height: 60upx; */
	}

	.line {
		width: 100%;
		height: .5upx;
		background-color: #a1a1a1;
		margin-top: 10upx;
	}

	.content {
		width: auto;
		margin-top: 20upx;
	}

	.content_title {
		font-size: 32upx;
		font-weight: bold;
	}

	.content_desc {
		font-size: 28upx;
		margin-top: 20upx;

		width: 100%;
		font-weight: normal;
	}
</style>
